package xuanke;

import xuanke.Course;
import xuanke.Student;
import xuanke.Teacher;

public class Test {
    public static void main(String[] args) {
        // 1. 实例化教师
        Teacher t1 = new Teacher("T001", "张教授", "男");
        Teacher t2 = new Teacher("T002", "李老师", "女");

        // 2. 教师开课
        Course c1 = new Course("C001", "Java编程", "教学楼A101", "周一上午");
        Course c2 = new Course("C002", "数据库原理", "实验楼B202", "周三下午");
        t1.offerCourse(c1);
        t2.offerCourse(c2);

        // 3. 实例化学生
        Student s1 = new Student("S001", "小明", "男");
        Student s2 = new Student("S002", "小红", "女");

        // 4. 学生选课
        s1.selectCourse(c1);
        s1.selectCourse(c2);
        s2.selectCourse(c1);

        // 5. 学生退课
        s1.dropCourse(c2);

        // 6. 打印课表（调用重写的printInfo方法）
        t1.printInfo();
        t2.printInfo();
        s1.printInfo();
        s2.printInfo();
    }
}
